import request from '@/utils/request'

// 获取表格
export function getRoleAPI(params) {
  return request({
    url: '/permission/role',
    method: 'get',
    params
  })
}

// 新增
export function addRoleAPI(data) {
  return request({
    url: '/permission/role',
    method: 'post',
    data
  })
}

// 修改
export function putRoleApi(id, data) {
  return request({
    url: 'permission/role/' + id,
    method: 'put',
    data
  })
}

// 回显
export function editRoleApi(id) {
  return request({
    url: 'permission/role/' + id,
    method: 'get',
  })
}

// 删除
export function delRoleAPI(id) {
  return request({
    url: '/permission/role/' + id,
    method: 'delete'
  })
}
